﻿
CREATE PROCEDURE QIC.ScriptInterface @InterfaceName VARCHAR(200), @ConfigName VARCHAR(50) = NULL
AS
BEGIN
	
	DECLARE @InterfaceId INT
	DECLARE @Script NVARCHAR(MAX)

	SELECT @InterfaceId = InterfaceId FROM QIC.Interface_(@ConfigName) WHERE InterfaceName = @InterfaceName

	SET @Script = QIC.InterfaceFactory(@ConfigName, @InterfaceId) + QIC.LB() + 'GO' + QIC.LB()

	EXEC QIC.LongPrint @Script

END